function printSonar(port)
  write("Sonar: " .. sonarReading(port))
end

repeat
  printSonar(4)
until isPressed(ESCAPE)
